/**
  ******************************************************************************
  * @file   pd_h_serial.h
  * @author Chris
  * @since  2023/11/22
  *
  * @brief  Header file of peripheral driver for USART(Hardware-Implemented).
  *
  ******************************************************************************
  */
#ifndef PD_H_USART_H
#define PD_H_USART_H

#include "stm32g4xx.h"

extern uint8_t Serial_TxPacket[];
extern uint8_t Serial_RxPacket[];
extern uint8_t Serial_RxFlag;

void PD_H_USART1_Init(void);

void PD_H_USART1_SendByte(uint8_t byte);

void PD_H_USART1_SendArray(uint8_t *array, uint16_t length);

void PD_H_USART1_SendString(char *String);

void PD_H_USART1_SendNumber(uint32_t number, uint8_t length);

void PD_H_USART1_Printf(char *format, ...);


uint8_t Serial_GetRxFlag(void);

uint8_t Serial_GetRxData(void);

#endif //PD_H_USART_H
